import Ajax from '@/util/Ajax'
import apiConstant from './api-constant'

const Api = {

  login (params) {
    return Ajax.post('api/user/login/in', params)
  },
  autoLogin (params) {
    return Ajax.post('api/user/login/byUUID', params)
  },
  getLoginCode (params) {
    return Ajax.post('api/user/login/sendCode', params)
  },
  getLoginUserMenuList (params) {
    return Ajax.post('api/user/rights', params)
  },
  welcomeData (params) {
    return Ajax.post('api/welcome/index', params)
  },
  getUserList (params) {
    return Ajax.post('api/user/list', params)
  },
  getAllUserList (params) {
    return Ajax.post('api/user/all/list', params)
  },
  updateUserStatus (params) {
    return Ajax.post('api/user/updateStatus', params)
  },
  saveOrUpdateUser (params) {
    return Ajax.post('api/user/saveOrUpdate', params)
  },
  getUserDetail (params) {
    return Ajax.post('api/user/get', params)
  },
  getUserInfo (params) {
    return Ajax.post('api/user/info', params)
  },
  menuList(data){
    return Ajax.post(apiConstant.API_MENU_LIST,data);
  },
  menuListTree(data){
    return Ajax.post(apiConstant.API_MENU_LIST_TREE,data);
  },
  saveMenu(data){
    return Ajax.post(apiConstant.API_MENU_SAVE,data);
  },
  deleteMenu(data){
    return Ajax.post(apiConstant.API_MENU_DELETE,data);
  },
  setMenuSortNum(data){
    return Ajax.post(apiConstant.API_MENU_SET_SORTNUM,data);
  },
  userMenuSet(data){
    return Ajax.post(apiConstant.API_USER_MENU_SET,data);
  },
  getMemberList (params) {
      return Ajax.post('api/member/list', params)
  },
  getFeedbackList (params) {
    return Ajax.post('api/feedback/list', params)
  },
  saveMemberStatus (params) {
      return Ajax.post('api/member/setStatus', params)
  },
  movieOrderList(data ={}){
    return Ajax.post('api/order/movie/list', data);
  },
  movieOrderDetail(data ={}){
    return Ajax.post('api/order/movie/get', data);
  },
  saveMovieTicketCode(data ={}){
    return Ajax.post('api/order/movie/ticketCode/save', data);
  },
  unLockSeat(data ={}){
    return Ajax.post('api/order/movie/unLockSeat', data);
  },
  jiedan(data ={}){
    return Ajax.post('api/order/movie/jiedan', data);
  },
  toNldyp(data ={}){
    return Ajax.post('api/order/movie/toNldyp', data);
  },
  setSupportRefund(data ={}){
    return Ajax.post('api/order/movie/setSupportRefund', data);
  },
  queryOrder2Refund (params) {
    return Ajax.post('api/refund/order/query', params)
  },
  getRefundCode (params) {
    return Ajax.post('api/order/refund/validCode', params)
  },
  applyRefund (params) {
    return Ajax.post('api/order/refund/apply', params)
  },
  refundOrderList (params) {
    return Ajax.post('api/order/refund/list', params)
  },
  refundCoupon (params) {
    return Ajax.post('api/order/refund/coupon', params)
  },
  refundAccount (params) {
    return Ajax.post('api/order/refund/account', params)
  },
  refundCash (params) {
    return Ajax.post('api/order/refund/cash', params)
  },
  deleteRefundOrder(params){
    return Ajax.post('api/order/refund/delete', params)
  },
  getSmsList (params) {
    return Ajax.post('api/sms/list', params)
  },
  getSysCfgList (params) {
    return Ajax.post('api/sys/cfg/list', params)
  },
  getSysCfg (params) {
    return Ajax.post('api/sys/cfg/get', params)
  },
  saveSysCfg (params) {
    return Ajax.post('api/sys/cfg/save', params)
  },
  getMovieLockSeatSwitch (params) {
    return Ajax.post('api/sys/cfg/movie/lock/seat/get', params)
  },
  saveMovieLockSeatSwitch (params) {
    return Ajax.post('api/sys/cfg/movie/lock/seat/switch', params)
  },
  getCouponBatchList (params) {
    return Ajax.post('api/couponBatch/list', params)
  },
  saveCouponBatch (params) {
    return Ajax.post('api/couponBatch/save', params)
  },
  getCouponBatch (params) {
    return Ajax.post('api/couponBatch/get', params)
  },
  setCouponBatchLock (params) {
    return Ajax.post('api/couponBatch/setLock', params)
  },
  setCouponBatchUnLock (params) {
    return Ajax.post('api/couponBatch/setUnLock', params)
  },
  setCouponBatchSetActive (params) {
    return Ajax.post('api/couponBatch/setActive', params)
  },
  getCouponList (params) {
    return Ajax.post('api/coupon/list', params)
  },
  setCouponLock (params) {
    return Ajax.post('api/coupon/setLock', params)
  },
  setCouponUnLock (params) {
    return Ajax.post('api/coupon/setUnLock', params)
  },
  getUserBindCouponList (params) {
    return Ajax.post('api/user/bind/coupon/list', params)
  },
  saveUserBindCoupon (params) {
    return Ajax.post('api/user/bind/coupon/save', params)
  },
  getJiedanCount (params) {
    return Ajax.post('api/order/movie/jiedan/count', params)
  },
  orderCount (params) {
    return Ajax.post('api/order/movie/order/count', params)
  },
  hasNewOrder (params) {
    return Ajax.post('/api/order/movie/hasNew', params)
  },
  hasNewMCOrder (params) {
    return Ajax.post('/api/order/memberCharge/hasNew', params)
  },
  querySql (params) {
    return Ajax.post('/api/sql/query', params)
  },
  getMallSubOrderList(params){
    return Ajax.post('api/order/list', params)
  },
  getMallSubOrderDetail(params){
    return Ajax.post('api/order/detail', params)
  },
}
export default Api
